#ifndef TABMANAGER_H
#define TABMANAGER_H

#include <QObject>
#include <QList>
#include "pluginhandler.h"
#include "../gui/whaletabbase.h"

class WhaleTabBase;
class TabScreen;

class TabManager : public QObject {
    Q_OBJECT

    public:
        TabManager( TabScreen * tabScreen, PluginHandler * pluginHandler );

    public slots:
        void restoreTabs();
        void saveTabs();
        void addTab( WhaleTabBase * tab );
        void tabClosed();
        
    private:
        WhaleTabBase * recreateTab( QString pluginName, QVariant constructors );
        
        QList< WhaleTabBase * > mActiveTabs;
        TabScreen * mTabScreen;
        PluginHandler * mPluginHandler;
};

#endif
